<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Demo-弹出窗口并请求远程数据</title>
<style>
	.g-loading-on{filter:alpha(opacity=40);-moz-opacity:0.4;opacity:0.4;cursor:auto;text-decoration:none;}
	.g-loading-on a{cursor:none;}
	
	.g-popwin{display:none;padding:20px;}
	.g-dialog-mask{position:absolute;display:none;background-color:#000;left:0;top:0;width:100%;filter:alpha(opacity=40);-moz-opacity:0.4;opacity:0.4;border:none;z-index:1000;}
	.g-dialog-win{position:absolute;display:none;left:20px;top:10px;background-color:#FFF;z-index:1000;background-color:#FFF;}
	.g-dialog-win .pop-border{border:5px solid #DBDBDB;}
	.g-dialog-win .pop-hd{cursor:move; background-color:#FFFF00;}
	.g-dialog-win .pop-hd .border{position:relative;}
	.g-dialog-win .pop-hd h4{padding:0;margin:0;}
	.g-dialog-win .pop-hd .close{right:2px;_right:12px;top:2px;width:29px;height:15px;position:absolute;background:url(imgs/ico_cart.png) no-repeat -70px -268px;overflow:hidden;}
	.g-dialog-win .pop-hd .close:hover{background-position:-70px -285px;}
</style>
</head>

<body>
<div id="pop_module_loader" ></div>
<a id="popup" href="#">弹出窗口</a>
<div style="border:#CCC 1px solid; background-color:#FFFFCC;padding:20px;">
	该Demo用要用来展示Widget:Dialog结合Widget:ModuleLoader。<br/>
	先动态加载Module:product-info，加载成功后弹出窗口
</div>
</body>
<script type="text/javascript" src="mdf/js/common/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="mdf/js/common/mdf-min.js"></script>
<script type="text/javascript" src="mdf/js/project/project-init.js"></script>
<script type="text/javascript" src="mdf/js/project/language-mapping.js"></script>
<script type="text/javascript" src="mdf/js/project/error-mapping.js"></script>
<script type="text/javascript" src="mdf/js/project/action-mapping.js"></script>
<script type="text/javascript" src="mdf/js/project/product-info.js"></script>
<script type="text/javascript" src="mdf/js/project/pop_module_loader.js"></script>
<script>
$(document).ready(function(){
  $("#popup").click(function(e){
		var popModuleLoader = $('#pop_module_loader').data('ModuleLoader');
		var htmlRequest = $.UT.CreateRequest({module:"product_info",action:"get_html",button:this});
		var jsonRequest = $.UT.CreateRequest({module:"product_info",action:"get_json"});
		popModuleLoader.changeModule("product_info",htmlRequest,jsonRequest);
		return false;
	});
});

</script>

</html>
